LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;

ENTITY WcDecoder IS
	PORT (
		--2 switch input
		UCP : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
		--player
		P : IN STD_LOGIC;
		--place to shore the result
		WC : OUT STD_LOGIC_VECTOR(1 DOWNTO 0));
END WcDecoder;

ARCHITECTURE archWcDecoder OF WcDecoder IS
BEGIN
	WC <= "00" WHEN UCP = "00" AND P = '0' ELSE
		"00" WHEN UCP = "01" AND P = '0' ELSE
		"01" WHEN UCP = "10" AND P = '0'ELSE
		"01" WHEN UCP = "11" AND P = '0'ELSE
		"10" WHEN UCP = "00" AND P = '1' ELSE
		"11" WHEN UCP = "01" AND P = '1' ELSE
		"10" WHEN UCP = "10" AND P = '1'ELSE
		"11";
END archWcDecoder;